﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class operate_getCollegeSet : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string sql = "select college_id,college_name from tb_college";
        System.Data.DataTable dt = SqlServer.GetDataTable(sql);
        //把表格转为字符串
        string strMajorSet = "";
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            strMajorSet = strMajorSet + dt.Rows[i][0].ToString() +":"+ dt.Rows[i][1].ToString()+ ",";
        }
        strMajorSet = strMajorSet.Substring(0, strMajorSet.Length - 1);
        Response.Write(strMajorSet);
        Response.End();
    }
}